package com.jl.jlapp.popu;

import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.CardView;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnTouchListener;
import android.widget.PopupWindow;
import android.widget.TextView;

import com.jl.jlapp.R;

public class PaymentTypePopu
  extends PopupWindow
{
  private TextView tvKnow;
  private View view;
  
  public PaymentTypePopu(Context paramContext)
  {
    super(paramContext);
    this.view = ((LayoutInflater)paramContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.payment_type_popu, null);
    this.tvKnow = ((TextView)this.view.findViewById(R.id.tv_know));
    this.tvKnow.setOnClickListener(new OnClickListener()
    {
      public void onClick(View paramAnonymousView)
      {
        PaymentTypePopu.this.dismiss();
      }
    });
    setContentView(this.view);
    setWidth(-1);
    setHeight(-1);
    setFocusable(true);
    setAnimationStyle(R.style.AnimBottom);
    setBackgroundDrawable(new ColorDrawable(ContextCompat.getColor(paramContext,R.color.white)));
    this.view.setOnTouchListener(new OnTouchListener()
    {
      public boolean onTouch(View paramAnonymousView, MotionEvent paramAnonymousMotionEvent)
      {
        paramAnonymousView = (CardView)PaymentTypePopu.this.view.findViewById(R.id.layout);
        int i = paramAnonymousView.getTop();
        int j = paramAnonymousView.getLeft();
        int k = paramAnonymousView.getHeight();
        int m = paramAnonymousView.getWidth();
        int n = (int)paramAnonymousMotionEvent.getY();
        int i1 = (int)paramAnonymousMotionEvent.getX();
        if ((paramAnonymousMotionEvent.getAction() == 1) && ((n < i) || (n > i + k) || (i1 < j) || (i1 > j + m))) {
          PaymentTypePopu.this.dismiss();
        }
        return true;
      }
    });
  }
}


/* Location:              /Users/davidzhang/Documents/decompileApk/jlfood-dex2jar.jar!/com/jl/jlapp/popu/PaymentTypePopu.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */